Browse Source
Merge pull request #184 from beescoop/12.0-beesdoo_purchase-po-mgmt
Merge pull request #184 from beescoop/12.0-beesdoo_purchase-po-mgmt
[12.0] beesdoo_purchase: allow inverting PO reference on invoice linepull/188/merge
Rémy Taymans
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 290 additions and 18 deletions
-
10beesdoo_purchase/README.rst
-
14beesdoo_purchase/__manifest__.py
-
66beesdoo_purchase/i18n/fr.po
-
50beesdoo_purchase/i18n/fr_BE.po
-
66beesdoo_purchase/i18n/fr_CH.po
-
2beesdoo_purchase/models/__init__.py
-
16beesdoo_purchase/models/account_invoice.py
-
13beesdoo_purchase/models/res_config.py
-
5beesdoo_purchase/readme/CONFIGURE.rst
-
1beesdoo_purchase/readme/DESCRIPTION.rst
-
9beesdoo_purchase/security/invoice_security.xml
-
33beesdoo_purchase/static/description/index.html
-
23beesdoo_purchase/views/res_config_settings_view.xml
@ -1,15 +1,21 @@ |
|||||
{ |
{ |
||||
"name": "Bees Purchase", |
"name": "Bees Purchase", |
||||
"summary": """ |
"summary": """ |
||||
- Adds a 'Responsible' field to purchase orders, |
|
||||
|
- Adds a 'Responsible' field to purchase orders |
||||
- A filter w.r.t. the mail sellers is placed on the products field of a |
- A filter w.r.t. the mail sellers is placed on the products field of a |
||||
purchase order. |
|
||||
|
purchase order |
||||
|
- Allow inverting the Purchase Order Reference on the invoice lines |
||||
""", |
""", |
||||
"author": "Beescoop - Cellule IT, " "Coop IT Easy SCRLfs", |
"author": "Beescoop - Cellule IT, " "Coop IT Easy SCRLfs", |
||||
"website": "https://github.com/beescoop/Obeesdoo", |
"website": "https://github.com/beescoop/Obeesdoo", |
||||
"category": "Purchase", |
"category": "Purchase", |
||||
"version": "12.0.1.1.0", |
|
||||
|
"version": "12.0.1.2.0", |
||||
"depends": ["base", "purchase", "beesdoo_product"], |
"depends": ["base", "purchase", "beesdoo_product"], |
||||
"data": ["views/purchase_order.xml", "report/report_purchaseorder.xml"], |
|
||||
|
"data": [ |
||||
|
"security/invoice_security.xml", |
||||
|
"views/purchase_order.xml", |
||||
|
"views/res_config_settings_view.xml", |
||||
|
"report/report_purchaseorder.xml", |
||||
|
], |
||||
"license": "AGPL-3", |
"license": "AGPL-3", |
||||
} |
} |
@ -0,0 +1,66 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * beesdoo_purchase |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 12.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2020-09-22 12:55+0000\n" |
||||
|
"PO-Revision-Date: 2020-09-22 12:55+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: \n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: \n" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model_terms:ir.ui.view,arch_db:beesdoo_purchase.report_purchaseorder_document |
||||
|
msgid "<strong>Your Referent:</strong>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model.fields,field_description:beesdoo_purchase.field_res_config_settings__group_invert_po_ref_on_inv_line |
||||
|
msgid "Allow inverting the Purchase Order Reference on the\n" |
||||
|
" invoice lines" |
||||
|
msgstr "Permet d'inverser la référence du Bon De Commande sur\n" |
||||
|
" les lignes de facture" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model.fields,help:beesdoo_purchase.field_res_config_settings__group_invert_po_ref_on_inv_line |
||||
|
msgid "Allows you to invert Purchase Order Reference on the\n" |
||||
|
" invoice lines." |
||||
|
msgstr "Permet d'inverser la référence du Bon De Commande sur\n" |
||||
|
" les lignes de facture." |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model,name:beesdoo_purchase.model_res_config_settings |
||||
|
msgid "Config Settings" |
||||
|
msgstr "Paramètres de configuration" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model.fields,field_description:beesdoo_purchase.field_purchase_order__create_uid |
||||
|
msgid "Create Uid" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:res.groups,name:beesdoo_purchase.group_invert_po_ref_on_inv_line |
||||
|
msgid "Invert Purchase Order Reference on invoice line" |
||||
|
msgstr "Inverser la référence du Bon De Commande sur la ligne de facture" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model,name:beesdoo_purchase.model_account_invoice |
||||
|
msgid "Invoice" |
||||
|
msgstr "Facture" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model,name:beesdoo_purchase.model_purchase_order |
||||
|
msgid "Purchase Order" |
||||
|
msgstr "Commande fournisseur" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model.fields,field_description:beesdoo_purchase.field_purchase_order__supervisor_id |
||||
|
msgid "Responsible" |
||||
|
msgstr "Responsable" |
||||
|
|
@ -0,0 +1,66 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * beesdoo_purchase |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 12.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2020-09-22 12:55+0000\n" |
||||
|
"PO-Revision-Date: 2020-09-22 12:55+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: \n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: \n" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model_terms:ir.ui.view,arch_db:beesdoo_purchase.report_purchaseorder_document |
||||
|
msgid "<strong>Your Referent:</strong>" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model.fields,field_description:beesdoo_purchase.field_res_config_settings__group_invert_po_ref_on_inv_line |
||||
|
msgid "Allow inverting the Purchase Order Reference on the\n" |
||||
|
" invoice lines" |
||||
|
msgstr "Permet d'inverser la référence du Bon De Commande sur\n" |
||||
|
" les lignes de facture" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model.fields,help:beesdoo_purchase.field_res_config_settings__group_invert_po_ref_on_inv_line |
||||
|
msgid "Allows you to invert Purchase Order Reference on the\n" |
||||
|
" invoice lines." |
||||
|
msgstr "Permet d'inverser la référence du Bon De Commande sur\n" |
||||
|
" les lignes de facture." |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model,name:beesdoo_purchase.model_res_config_settings |
||||
|
msgid "Config Settings" |
||||
|
msgstr "Paramètres de configuration" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model.fields,field_description:beesdoo_purchase.field_purchase_order__create_uid |
||||
|
msgid "Create Uid" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:res.groups,name:beesdoo_purchase.group_invert_po_ref_on_inv_line |
||||
|
msgid "Invert Purchase Order Reference on invoice line" |
||||
|
msgstr "Inverser la référence du Bon De Commande sur la ligne de facture" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model,name:beesdoo_purchase.model_account_invoice |
||||
|
msgid "Invoice" |
||||
|
msgstr "Facture" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model,name:beesdoo_purchase.model_purchase_order |
||||
|
msgid "Purchase Order" |
||||
|
msgstr "Commande fournisseur" |
||||
|
|
||||
|
#. module: beesdoo_purchase |
||||
|
#: model:ir.model.fields,field_description:beesdoo_purchase.field_purchase_order__supervisor_id |
||||
|
msgid "Responsible" |
||||
|
msgstr "Responsable" |
||||
|
|
@ -1 +1,3 @@ |
|||||
|
from . import account_invoice |
||||
from . import purchase |
from . import purchase |
||||
|
from . import res_config |
@ -0,0 +1,16 @@ |
|||||
|
from odoo import api, fields, models, _ |
||||
|
|
||||
|
|
||||
|
class AccountInvoice(models.Model): |
||||
|
_inherit = "account.invoice" |
||||
|
|
||||
|
def _prepare_invoice_line_from_po_line(self, line): |
||||
|
""" Override parent's method to invert Purchase Order Reference on invoice line""" |
||||
|
invoice_line = super( |
||||
|
AccountInvoice, self |
||||
|
)._prepare_invoice_line_from_po_line(line) |
||||
|
if self.user_has_groups( |
||||
|
"beesdoo_purchase." "group_invert_po_ref_on_inv_line" |
||||
|
): |
||||
|
invoice_line["name"] = line.name + ": " + line.order_id.name |
||||
|
return invoice_line |
@ -0,0 +1,13 @@ |
|||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ResConfigSettings(models.TransientModel): |
||||
|
_inherit = "res.config.settings" |
||||
|
|
||||
|
group_invert_po_ref_on_inv_line = fields.Boolean( |
||||
|
"""Allow inverting the Purchase Order Reference on the |
||||
|
invoice lines""", |
||||
|
implied_group="beesdoo_purchase." "group_invert_po_ref_on_inv_line", |
||||
|
help="""Allows you to invert Purchase Order Reference on the |
||||
|
invoice lines.""", |
||||
|
) |
@ -0,0 +1,5 @@ |
|||||
|
The setting *Invert Purchase Order Reference on invoice line* needs to be checked. |
||||
|
This can be done in these following ways: |
||||
|
|
||||
|
* on the Access Rights (Technical Settings) of the user (Invert Purchase Order Reference on invoice line) |
||||
|
* on the Invoicing Settings inside of the section `Invoices` (Allow inverting the Purchase Order Reference on the invoice lines) |
@ -0,0 +1,9 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
|
||||
|
<record id="group_invert_po_ref_on_inv_line" model="res.groups"> |
||||
|
<field name="name">Invert Purchase Order Reference on invoice line</field> |
||||
|
<field name="category_id" ref="base.module_category_hidden"/> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1,23 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
|
||||
|
<odoo> |
||||
|
<record id="res_config_settings_view_form" model="ir.ui.view"> |
||||
|
<field name="name">res invoice line description settings</field> |
||||
|
<field name="model">res.config.settings</field> |
||||
|
<field name="inherit_id" ref="account.res_config_settings_view_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath |
||||
|
expr="//div[@id='invoicing_settings']" |
||||
|
position="inside"> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="group_invert_po_ref_on_inv_line"/> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="group_invert_po_ref_on_inv_line"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue