Browse Source

Apr 4 [UPDT] : Bug Fixed

pull/278/merge
AjmalCybro 1 year ago
parent
commit
40f1abb507
  1. 3
      multi_branch_base/views/branch_account_move_views.xml
  2. 8
      multi_branch_pos/models/pos_orders.py

3
multi_branch_base/views/branch_account_move_views.xml

@ -7,8 +7,7 @@
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_date']" position="after">
<field name="branch_id" options="{'no_create': True}" required="1"
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="branch_id" options="{'no_create': True}" required="1"/>
</xpath>
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='account_id']" position="attributes">
<attribute name="domain">[('deprecated', '=', False), ('account_type', 'not in', ('asset_receivable', 'liability_payable')), ('company_id', '=', parent.company_id), ('is_off_balance', '=', False), '|', ('branch_id', '=', parent.branch_id),('branch_id', '=', False)]</attribute>

8
multi_branch_pos/models/pos_orders.py

@ -23,7 +23,6 @@
import logging
from odoo import fields, models
_logger = logging.getLogger(__name__)
@ -36,3 +35,10 @@ class BranchPosOrder(models.Model):
related='session_id.branch_id',
string='Branch', help='Branches allowed',
store=True)
def _generate_pos_order_invoice(self):
res = super(BranchPosOrder, self)._generate_pos_order_invoice()
if self.account_move:
self.account_move.write({'branch_id': self.branch_id})
return res

Loading…
Cancel
Save