[FIX]: POS: Remove field and Attrs.
This commit is contained in:
parent
700ea4819e
commit
ca15ffb3ed
@ -61,7 +61,6 @@ class PosConfig(models.Model):
|
|||||||
return self.env['ir.qweb'].render('point_of_sale.customer_facing_display_html')
|
return self.env['ir.qweb'].render('point_of_sale.customer_facing_display_html')
|
||||||
|
|
||||||
name = fields.Char(string='Point of Sale Name', index=True, required=True, help="An internal identification of the point of sale.")
|
name = fields.Char(string='Point of Sale Name', index=True, required=True, help="An internal identification of the point of sale.")
|
||||||
is_installed_account_accountant = fields.Boolean(compute="_compute_is_installed_account_accountant")
|
|
||||||
journal_ids = fields.Many2many(
|
journal_ids = fields.Many2many(
|
||||||
'account.journal', 'pos_config_journal_rel',
|
'account.journal', 'pos_config_journal_rel',
|
||||||
'pos_config_id', 'journal_id', string='Available Payment Methods',
|
'pos_config_id', 'journal_id', string='Available Payment Methods',
|
||||||
@ -163,11 +162,6 @@ class PosConfig(models.Model):
|
|||||||
is_posbox = fields.Boolean("PosBox")
|
is_posbox = fields.Boolean("PosBox")
|
||||||
is_header_or_footer = fields.Boolean("Header & Footer")
|
is_header_or_footer = fields.Boolean("Header & Footer")
|
||||||
|
|
||||||
def _compute_is_installed_account_accountant(self):
|
|
||||||
account_accountant = self.env['ir.module.module'].sudo().search([('name', '=', 'account_accountant'), ('state', '=', 'installed')])
|
|
||||||
for pos_config in self:
|
|
||||||
pos_config.is_installed_account_accountant = account_accountant and account_accountant.id
|
|
||||||
|
|
||||||
@api.depends('journal_id.currency_id', 'journal_id.company_id.currency_id')
|
@api.depends('journal_id.currency_id', 'journal_id.company_id.currency_id')
|
||||||
def _compute_currency(self):
|
def _compute_currency(self):
|
||||||
for pos_config in self:
|
for pos_config in self:
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
<form string="Point of Sale Configuration">
|
<form string="Point of Sale Configuration">
|
||||||
<sheet>
|
<sheet>
|
||||||
<field name="currency_id" invisible="1"/>
|
<field name="currency_id" invisible="1"/>
|
||||||
<field name="is_installed_account_accountant" invisible="1"/>
|
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
||||||
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
|
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
|
||||||
@ -450,29 +449,31 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2 attrs="{'invisible': [('is_installed_account_accountant', '=', False)]}">Accounting</h2>
|
<h2>Accounting</h2>
|
||||||
<div class="row mt16 o_settings_container" attrs="{'invisible': [('is_installed_account_accountant', '=', False)]}">
|
<div class="row mt16 o_settings_container">
|
||||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
<div class="col-xs-12 col-md-6 o_setting_box" title="Whenever you close a session, one entry is generated in the following accounting journal for all the orders not invoiced. Invoices are recorded in accounting separately.">
|
||||||
<div class="o_setting_right_pane">
|
<div class="o_setting_right_pane">
|
||||||
<label string="Journal Entries"/>
|
<label string="Journal Entries"/>
|
||||||
<div class="text-muted">
|
<div class="text-muted">
|
||||||
Configuration for journal entries of PoS orders
|
Configuration for journal entries of PoS orders
|
||||||
</div>
|
</div>
|
||||||
<div class="content-group">
|
<div class="content-group" >
|
||||||
<div class="row mt16" title="Whenever you close a session, one entry is generated in the following accounting journal for all the orders not invoiced. Invoices are recorded in accounting separately.">
|
<div class="content-group mt16" >
|
||||||
<label string="Sales Journal" for="journal_id" class="col-md-3 o_light_label" widget="selection"/>
|
<field name="journal_id" widget="selection"/>
|
||||||
<field name="journal_id"/>
|
|
||||||
</div>
|
|
||||||
<div class="row" groups="account.group_account_user" title="Get one journal item per product rather than one journal item per receipt line. This works for any anonymous order. If the customer is set on the order, one journal item is created for each receipt line. This option is recommended for an easy review of your journal entries when managing lots of orders.">
|
|
||||||
<label string="Group Journal Items" for="group_by" class="col-md-3 o_light_label"/>
|
|
||||||
<field name="group_by"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 o_setting_box" id="group_by" title="Get one journal item per product rather than one journal item per receipt line. This works for any anonymous order. If the customer is set on the order, one journal item is created for each receipt line. This option is recommended for an easy review of your journal entries when managing lots of orders.">
|
||||||
|
<div class="o_setting_left_pane">
|
||||||
|
<field name="group_by"/>
|
||||||
|
</div>
|
||||||
|
<div class="o_setting_right_pane">
|
||||||
|
<label string="Group Journal Items" for="group_by"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</sheet>
|
</sheet>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
Reference in New Issue
Block a user