[18.0][FIX] contract_manually_invoiced: wizard invoice manually view#1408
[18.0][FIX] contract_manually_invoiced: wizard invoice manually view#1408
Conversation
tobiaszehntner
left a comment
There was a problem hiding this comment.
You hide the filter to debug-mode while adding the boolean. The idea of the filter is that the user can do all specifics they would like, including choosing non-manually-invoiced contracts.
If we add the boolean for user-friendliness, I would suggest to make it clearer ('Only include manually invoice contracts'), and avoid excluding them if it's unticked.
| <group | ||
| string="Contract Filter" | ||
| invisible="not invoice_date" | ||
| groups="base.group_no_one" |
There was a problem hiding this comment.
I find it's too limiting to put the filter only for debug-mode. Our clients use filtering regularly but aren't necessarily familiar with debug mode. However, I agree it's a bit of an extra technical thing, hence my reasoning to put it away in a second tab: accessible but not confusing.
| <xpath expr="//form/group[last()]" position="after"> | ||
| <notebook invisible="not invoice_date"> | ||
| <page name="contracts" string="Contracts"> | ||
| <button |
| class ContractManuallyCreateInvoice(models.TransientModel): | ||
| _inherit = "contract.manually.create.invoice" | ||
|
|
||
| manually_invoiced = fields.Boolean( |
There was a problem hiding this comment.
| manually_invoiced = fields.Boolean( | |
| is_manually_invoiced = fields.Boolean( | |
| "Only Manually Invoiced Contracts |
Yes that could add some flexibility (even though it's already there via the filter for the technically versed users)
| ("is_manually_invoiced", "=", wizard.manually_invoiced), | ||
| ] | ||
| if self.env.company.enable_contract_invoice_manually: | ||
| domain = expression.AND([domain, [("is_manually_invoiced", "=", True)]]) |
There was a problem hiding this comment.
I don't know what your use case is, but I think it's not clear from the boolean in the view that unticking it would exclude the manually invoiced contracts. Maybe only add the domain if it's ticked, and otherwise include both types of contracts?
| </page> | ||
| </notebook> | ||
| <field name="invoice_date" position="after"> | ||
| <field name="manually_invoiced" /> |
There was a problem hiding this comment.
This should only show when the config setting is active
@tobiaszehntner Thanks for the feedback. For the manually invoiced contracts, the most convenient I find is to select some contracts from the list view and launch a "create invoice" action. You can use the standard filters on the list view (To Invoice & Manually Invoiced). |
|
@jbaudoux you seem to describe the basic behavior from |
The wizard to invoice manually was not displayed properly.
I also allow to choose to invoice only the manually invoiced contracts or not.
I removed the button to view the contracts as this is there by default in contract module.
cc @tobiaszehntner