Skip to content

Commit

Permalink
Merge PR #152 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
github-grap-bot committed Jun 23, 2024
2 parents e64f5c1 + 6e71503 commit d206f96
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 34 deletions.
2 changes: 1 addition & 1 deletion recurring_consignment/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"views/menu.xml",
"wizards/view_invoice_commission_wizard.xml",
"wizards/view_consignor_create_wizard.xml",
# "views/view_account_invoice_line.xml",
"views/view_account_move.xml",
"views/view_account_tax.xml",
"views/view_account_product_fiscal_classification.xml",
"views/view_product_template.xml",
Expand Down
2 changes: 1 addition & 1 deletion recurring_consignment/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ msgstr "En dépôt vente"
#: model:ir.model.fields,field_description:recurring_consignment.field_account_move__is_consignment_invoice
#: model:ir.model.fields,field_description:recurring_consignment.field_account_payment__is_consignment_invoice
msgid "Is Consignment Invoice"
msgstr "Est une facture de commission"
msgstr "Facture de commission"

#. module: recurring_consignment
#: model:ir.model.fields,field_description:recurring_consignment.field_product_product__is_consignment
Expand Down
10 changes: 6 additions & 4 deletions recurring_consignment/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ def _recurring_consigment_mark_as_paid(self):
# View Section
def button_commission_view_invoice_lines(self):
invoice_lines = self.mapped("invoice_line_ids.consignment_invoice_line_ids")
action = self.env.ref("recurring_consignment.action_account_invoice_line")
action_data = action.read()[0]
action_data["domain"] = [("id", "in", invoice_lines.ids)]
return action_data
action = self.env["ir.actions.act_window"]._for_xml_id(
"account.action_move_line_select"
)
action["domain"] = [("id", "in", invoice_lines.ids)]
action["context"] = {}
return action

# Report Function
def get_commission_information_summary(self):
Expand Down
28 changes: 0 additions & 28 deletions recurring_consignment/views/view_account_invoice_line.xml

This file was deleted.

22 changes: 22 additions & 0 deletions recurring_consignment/views/view_account_move.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2022-Today GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="view_account_move_form" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<group name="accounting_info_group" position="after">
<group name="recurring_consignment" string="Recurring Consignment" attrs="{'invisible': [('is_consignment_invoice', '=', False)]}">
<field name="is_consignment_invoice" />
<button name="button_commission_view_invoice_lines" string="View commissionned invoiced lines" colspan="2" type="object" />
</group>
</group>
</field>
</record>

</odoo>

0 comments on commit d206f96

Please sign in to comment.