Merge lp:~dorian-kemps/unifield-server/US-10067-10068 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 6340
Proposed branch: lp:~dorian-kemps/unifield-server/US-10067-10068
Merge into: lp:unifield-server
Diff against target: 108 lines (+26/-11)
3 files modified
bin/addons/msf_profile/i18n/fr_MF.po (+13/-2)
bin/addons/purchase/purchase_view.xml (+3/-2)
bin/addons/purchase/purchase_workflow.py (+10/-7)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-10067-10068
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+429839@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2022-08-23 13:15:58 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2022-09-13 15:34:42 +0000
@@ -17188,14 +17188,25 @@
17188msgid "Warning!"17188msgid "Warning!"
17189msgstr "Avertissement!"17189msgstr "Avertissement!"
1719017190
17191#. modules: purchase, sale, account_override17191#. modules: sale, account_override
17192#: code:addons/purchase/purchase_workflow.py:549
17193#: code:addons/sale/sale_workflow.py:52917192#: code:addons/sale/sale_workflow.py:529
17194#: code:addons/account_override/invoice.py:82917193#: code:addons/account_override/invoice.py:829
17195#, python-format17194#, python-format
17196msgid "Taxes are forbidden with Intermission and Intersection partners."17195msgid "Taxes are forbidden with Intermission and Intersection partners."
17197msgstr "Les taxes sont interdites avec les partenaires Intermission et Intersection."17196msgstr "Les taxes sont interdites avec les partenaires Intermission et Intersection."
1719817197
17198#. modules: purchase
17199#: code:addons/purchase/purchase_workflow.py:549
17200#, python-format
17201msgid "Taxes are forbidden with Internal, Intermission and Intersection partners."
17202msgstr "Les taxes sont interdites avec les partenaires Interne, Intermission et Intersection."
17203
17204#. modules: purchase
17205#: code:addons/purchase/purchase_workflow.py:607
17206#, python-format
17207msgid "Taxes are forbidden with the In Kind Donation Order Type."
17208msgstr "Les taxes sont interdites avec le Type de Commande Donation en Nature."
17209
17199#. module: account17210#. module: account
17200#: model:ir.actions.act_window,name:account.action_account_fiscal_position_form17211#: model:ir.actions.act_window,name:account.action_account_fiscal_position_form
17201#: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form17212#: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form
1720217213
=== modified file 'bin/addons/purchase/purchase_view.xml'
--- bin/addons/purchase/purchase_view.xml 2022-08-09 15:41:58 +0000
+++ bin/addons/purchase/purchase_view.xml 2022-09-13 15:34:42 +0000
@@ -388,7 +388,7 @@
388 </tree>388 </tree>
389 </field>389 </field>
390 <field name="has_tax_at_line_level" invisible="1" />390 <field name="has_tax_at_line_level" invisible="1" />
391 <field name="tax_line" nolabel="1" attrs="{'invisible': [('partner_type', '!=', 'external')], 'readonly': ['|', ('not_beyond_validated','=', False), ('has_tax_at_line_level', '=', True)]}">391 <field name="tax_line" nolabel="1" attrs="{'invisible': ['|', ('partner_type', '!=', 'external'), ('order_type', '=', 'in_kind')], 'readonly': ['|', ('not_beyond_validated','=', False), ('has_tax_at_line_level', '=', True)]}">
392 <tree editable="bottom" string="Taxes">392 <tree editable="bottom" string="Taxes">
393 <field name="account_tax_id" on_change="tax_code_change(account_tax_id, parent.amount_untaxed, parent.partner_id, context)" />393 <field name="account_tax_id" on_change="tax_code_change(account_tax_id, parent.amount_untaxed, parent.partner_id, context)" />
394 <field name="name"/>394 <field name="name"/>
@@ -698,7 +698,8 @@
698 </group>698 </group>
699699
700 <field name="vat_ok" invisible="1"/>700 <field name="vat_ok" invisible="1"/>
701 <group colspan="4" col="4" attrs="{'invisible': [('vat_ok', '=', False)]}">701 <field name="po_partner_type_stored" invisible="1"/>
702 <group colspan="4" col="4" attrs="{'invisible': ['|', '|', ('vat_ok', '=', False), ('po_partner_type_stored', '=', 'internal'), ('po_order_type', '=', 'in_kind')]}">
702 <separator colspan="4" string="Taxes"/>703 <separator colspan="4" string="Taxes"/>
703 <field colspan="4" nolabel="1" name="taxes_id" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>704 <field colspan="4" nolabel="1" name="taxes_id" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
704 </group>705 </group>
705706
=== modified file 'bin/addons/purchase/purchase_workflow.py'
--- bin/addons/purchase/purchase_workflow.py 2022-04-06 16:04:57 +0000
+++ bin/addons/purchase/purchase_workflow.py 2022-09-13 15:34:42 +0000
@@ -47,7 +47,7 @@
47 self.check_analytic_distribution(cr, uid, ids_to_check, context=context)47 self.check_analytic_distribution(cr, uid, ids_to_check, context=context)
48 self.check_if_stock_take_date_with_esc_partner(cr, uid, ids_to_check, context=context)48 self.check_if_stock_take_date_with_esc_partner(cr, uid, ids_to_check, context=context)
49 self.check_unit_price(cr, uid, ids_to_check, context=context)49 self.check_unit_price(cr, uid, ids_to_check, context=context)
50 self.check_po_tax(cr, uid, ids_to_check, context=context)50 self.check_pol_tax(cr, uid, ids_to_check, context=context)
51 wiz_id = self.pool.get('purchase.order.line.nsl.validation.wizard').create(cr, uid, {'pol_ids': [(6, 0, ids)], 'message': ', '.join(nsl)}, context=context)51 wiz_id = self.pool.get('purchase.order.line.nsl.validation.wizard').create(cr, uid, {'pol_ids': [(6, 0, ids)], 'message': ', '.join(nsl)}, context=context)
52 return {52 return {
53 'type': 'ir.actions.act_window',53 'type': 'ir.actions.act_window',
@@ -591,17 +591,20 @@
591591
592 return True592 return True
593593
594 def check_po_tax(self, cr, uid, ids, context=None):594 def check_pol_tax(self, cr, uid, ids, context=None):
595 """595 """
596 Prevents from validating a PO with taxes when using an Intermission or Intersection partner596 Prevents from validating a PO line with taxes when using an Internal, Intermission or Intersection partner; and
597 with an In Kind Donation Order Type
597 """598 """
598 if context is None:599 if context is None:
599 context = {}600 context = {}
600 if isinstance(ids, (int, long)):601 if isinstance(ids, (int, long)):
601 ids = [ids]602 ids = [ids]
602 for po_line in self.browse(cr, uid, ids, fields_to_fetch=['order_id', 'taxes_id'], context=context):603 for po_line in self.browse(cr, uid, ids, fields_to_fetch=['order_id', 'taxes_id'], context=context):
603 if po_line.taxes_id and po_line.order_id.partner_type in ('intermission', 'section'):604 if po_line.taxes_id and po_line.order_id.partner_type in ('internal', 'intermission', 'section'):
604 raise osv.except_osv(_('Error'), _("Taxes are forbidden with Intermission and Intersection partners."))605 raise osv.except_osv(_('Error'), _("Taxes are forbidden with Internal, Intermission and Intersection partners."))
606 if po_line.taxes_id and po_line.order_id.order_type == 'in_kind':
607 raise osv.except_osv(_('Error'), _("Taxes are forbidden with the In Kind Donation Order Type."))
605608
606 def check_origin_for_validation(self, cr, uid, ids, context=None):609 def check_origin_for_validation(self, cr, uid, ids, context=None):
607 if not context:610 if not context:
@@ -636,7 +639,7 @@
636 self.check_analytic_distribution(cr, uid, ids, context=context)639 self.check_analytic_distribution(cr, uid, ids, context=context)
637 self.check_if_stock_take_date_with_esc_partner(cr, uid, ids, context=context)640 self.check_if_stock_take_date_with_esc_partner(cr, uid, ids, context=context)
638 self.check_unit_price(cr, uid, ids, context=context)641 self.check_unit_price(cr, uid, ids, context=context)
639 self.check_po_tax(cr, uid, ids, context=context)642 self.check_pol_tax(cr, uid, ids, context=context)
640643
641 # update FO lines:644 # update FO lines:
642 self.update_fo_lines(cr, uid, ids, context=context)645 self.update_fo_lines(cr, uid, ids, context=context)
@@ -956,7 +959,7 @@
956 if isinstance(ids, (int, long)):959 if isinstance(ids, (int, long)):
957 ids = [ids]960 ids = [ids]
958961
959 po = self.browse(cr, uid, ids[0], context=context)962 po = self.browse(cr, uid, ids[0], fields_to_fetch=['order_line'], context=context)
960 return self.pool.get('purchase.order.line').validated(cr, uid, [pol.id for pol in po.order_line], context=context)963 return self.pool.get('purchase.order.line').validated(cr, uid, [pol.id for pol in po.order_line], context=context)
961964
962965

Subscribers

People subscribed via source and target branches