Browse Source

[UPDT] Workflow updated

pull/206/merge
AjmalCybro 3 years ago
parent
commit
6fe76769e7
  1. 18
      multi_branch_base/models/branch_product_template.py
  2. 20
      multi_branch_base/models/branch_res_partner.py
  3. BIN
      multi_branch_base/static/description/assets/screenshots/hero.png
  4. BIN
      multi_branch_base/static/description/assets/screenshots/mb01.png
  5. BIN
      multi_branch_base/static/description/assets/screenshots/mb02.png
  6. BIN
      multi_branch_base/static/description/assets/screenshots/mb03.png
  7. BIN
      multi_branch_base/static/description/assets/screenshots/mb04.png
  8. BIN
      multi_branch_base/static/description/assets/screenshots/mb05.png
  9. BIN
      multi_branch_base/static/description/assets/screenshots/mb06.png
  10. BIN
      multi_branch_base/static/description/assets/screenshots/mb07.png
  11. BIN
      multi_branch_base/static/description/assets/screenshots/mb08.png
  12. BIN
      multi_branch_base/static/description/assets/screenshots/mb09.png
  13. BIN
      multi_branch_base/static/description/assets/screenshots/mb10.png
  14. BIN
      multi_branch_base/static/description/assets/screenshots/mb11.png
  15. BIN
      multi_branch_base/static/description/assets/screenshots/mb12.png
  16. BIN
      multi_branch_base/static/description/assets/screenshots/mb13.png
  17. BIN
      multi_branch_base/static/description/assets/screenshots/mb14.png
  18. BIN
      multi_branch_base/static/description/assets/screenshots/pos1.png
  19. BIN
      multi_branch_base/static/description/assets/screenshots/pos2.png
  20. BIN
      multi_branch_base/static/description/assets/screenshots/pos3.png
  21. BIN
      multi_branch_base/static/description/assets/screenshots/pos4.png
  22. BIN
      multi_branch_base/static/description/assets/screenshots/pos5.png
  23. 1544
      multi_branch_base/static/description/index.html

18
multi_branch_base/models/branch_product_template.py

@ -28,8 +28,9 @@ class ProductTemplate(models.Model):
_inherit = 'product.template'
branch_id = fields.Many2one("res.branch", string='Branch', store=True,
readonly=False,
compute="_compute_branch")
help='Leave this field empty if this product is'
' shared between all branches'
)
allowed_branch_ids = fields.Many2many('res.branch', store=True,
string="Allowed Branches",
compute='_compute_allowed_branch_ids')
@ -38,16 +39,3 @@ class ProductTemplate(models.Model):
def _compute_allowed_branch_ids(self):
for po in self:
po.allowed_branch_ids = self.env.user.branch_ids.ids
@api.depends('company_id')
def _compute_branch(self):
for order in self:
company = self.env.company
so_company = order.company_id if order.company_id else self.env.company
branch_ids = self.env.user.branch_ids
branch = branch_ids.filtered(
lambda branch: branch.company_id == so_company)
if branch:
order.branch_id = branch.ids[0]
else:
order.branch_id = False

20
multi_branch_base/models/branch_res_partner.py

@ -28,10 +28,11 @@ class BranchPartner(models.Model):
_inherit = "res.partner"
branch_id = fields.Many2one("res.branch", string='Branch', store=True,
readonly=False,
compute="_compute_branch")
help='Leave this field empty if the partner is'
' shared between all branches'
)
allowed_branch_ids = fields.Many2many('res.branch', store=True,
string="Allowed Branches",
string="Branches",
compute='_compute_allowed_branch_ids')
@api.depends('company_id')
@ -39,19 +40,6 @@ class BranchPartner(models.Model):
for po in self:
po.allowed_branch_ids = self.env.user.branch_ids.ids
@api.depends('company_id')
def _compute_branch(self):
for order in self:
company = self.env.company
so_company = order.company_id if order.company_id else self.env.company
branch_ids = self.env.user.branch_ids
branch = branch_ids.filtered(
lambda branch: branch.company_id == so_company)
if branch:
order.branch_id = branch.ids[0]
else:
order.branch_id = False
@api.model
def default_get(self, default_fields):
"""Add the company of the parent as default if we are creating a

BIN
multi_branch_base/static/description/assets/screenshots/hero.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 KiB

After

Width:  |  Height:  |  Size: 105 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb01.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb02.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb03.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb04.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb05.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb06.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb07.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb08.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb09.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb11.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb12.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb13.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

BIN
multi_branch_base/static/description/assets/screenshots/mb14.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

BIN
multi_branch_base/static/description/assets/screenshots/pos1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
multi_branch_base/static/description/assets/screenshots/pos2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
multi_branch_base/static/description/assets/screenshots/pos3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
multi_branch_base/static/description/assets/screenshots/pos4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
multi_branch_base/static/description/assets/screenshots/pos5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

1544
multi_branch_base/static/description/index.html

File diff suppressed because it is too large
Loading…
Cancel
Save